# set集合无序
s = {1,'哈哈',3,6,2}
s1 = {'hihi'}
print(s)
print(s1)

s2 = set()
s2.add('哈哈')
s2.add('呵')
print(s2)

s2.pop() # 随机删除一个元素
print(s2)

s2.add('流失')
s2.add(
    '轻甲'
)
print(s2)

s2.remove('流失')
print(s2)

set1 = { 1,2,3,4,5,6}
set2 = {3,4,5,6,7,8}
# 交集
set3 = set1 & set2
set4 = set1.intersection(set2)
print(set3)
print(set4)

# 并集
set5 = set1 | set2
set6 = set1.union(set2)
print(set5)
print(set6)

# 差集
set7 = set1 - set2
set8 = set1.difference(set2)
print(set7)
print(set8)

lst = ['周杰伦', '周华健', '周深','周杰伦', '周华健','粥杰轮']
print(lst)
print(set(lst))
print(list(set(lst)))

